package cn.itsource.org.service;

import cn.itsource.basic.utils.PageList;
import cn.itsource.org.domain.Department;
import cn.itsource.org.query.DepartmentQuery;


import java.util.List;

/**
 * 部门业务层
 */
public interface IDepartmentService {



    /**
     * 查询所有
     */
    List<Department> findAll();

    /**
     * 根据id查询
     */
    Department findOne(Long id);

    /**
     * 新增和修改
     */
    void saveOrUpdate(Department department);

    /**
     * 删除
     */
    void delete(Long id);

    /**
     * 分页查询
     */
    PageList<Department> getAll(DepartmentQuery query);

    /**
     * 批量删除
     */
    void bathDeleteById(Long[] ids);

    //查询上级部门
    List<Department> findParentDepts();

    //层级查询
    List<Department> TreeDept();
}
